from fractions import  Fraction

list0 = [2]
i = 1
k = 1
while i < 100:
    if i % 3==2:
        list0.append(2*k)
        k += 1
    else:
        list0.append(1)
    i += 1

print(list0)
sums = 0
for n in list0[::-1]:
    sums = Fraction(1,n+sums)

ss = 0
for sss in str(sums.denominator):
    ss += int(sss)
print(ss)